﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Demo
{
    public partial class _20150327 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            UserInfo user1 = new UserInfo();
            user1.Name = "张三";
            user1.Birthday = DateTime .Parse (TextBox1 .Text );
            if(user1.DecideAge (user1.Birthday )>=18)
            {
                Response.Write("你是成年人了！");
            }
            else
            {
                Response.Write("你还没长大！");
            }
        }
    }
}